package com.qujia.markert.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.qujia.coupon.domain.AppUserInfo;
import com.qujia.coupon.domain.CouponIssue;
import com.qujia.markert.domain.CouponTemplate;
import com.qujia.station.domain.Oil;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class CouponUserVo {
    private Integer couponUserId;           //用户优惠券模板
    private String mobilePhone;             //客户手机号
    private Integer couponTemplateId;       //优惠券模板ID
    private String couponIssueId;           //领取方式ID
    private Integer enterpriseId;           //油企ID
    private String couponNo;                //优惠券吗
    private String couponIsUsed;            //是否使用：0、未使用；1、已使用；
    private Date couponGetTime;             //优惠券领取时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String couponEffectiveTime;       //优惠券失效时间
    private String couponIsEffective;       //是否有效
    private AppUserInfo appUserInfo;        //用户信息
    private String verificationUserPhone;   //核销人员手机号
    private Date verificationTime;          //核销时间
    private String verificationUserAccount;   //核销人员账号

    private CouponTemplate couponTemplateInfo;  //优惠券模板信息
    private CouponIssue couponIssueInfo;        //领取方式信息
    private List<Oil> oilList;                  //油品列表

    //查询用户优惠券类型参数
    private String couTypeParam;              //查询优惠券类型参数
    private String randomFlag;                //随机数

    //返回前端参数用 使用优惠后的金额
    private BigDecimal newAmtByCoupon;       //使用优惠券后的金额
    private String canUse;                   //优惠券是否可用
    private String oils;                     //优惠券适用油品 格式：92#,98#,0#
    private String couponStaNames;           //优惠券适用油站
    private String verStaNames;              //核销站点名称  格式：核销站点1，核销站点2
    private BigDecimal couponAmtByCNY;       //优惠券优惠的金额

    private Long superId;
    private BigDecimal couponThresholdAmt;       //使用门槛
    private String oilId;
    private String memberLevel;
    private Integer stationId;
    private String payType;
    private Integer couponId;               //优惠券id
    private String issueName;               //优惠券活动名称
    private String issueType;               //优惠券活动名称
    private String couponType;              //优惠券类型
    private BigDecimal couponAmt;           //优惠券面值
    private String activityFlag;
    private String minUseCouponAmt;//是否互斥0否 1是

    private String ccsdStatus;//充值活动状态

    private Long ccsdId;//充值活动id

    @Override
    public boolean equals(Object obj) {
        CouponUserVo coupon=null;
        if(obj instanceof CouponUserVo){
            coupon= (CouponUserVo) obj;
        }else{
            return false;
        }
        return this.toString().equals(coupon.toString());
    }

    @Override
    public int hashCode() {
        return this.toString().hashCode();
    }

    @Override
    public String toString() {
        return "CouponUser{" +
                "couponUserId=" + couponUserId +
                ", mobilePhone='" + mobilePhone + '\'' +
                ", couponTemplateId=" + couponTemplateId +
                ", couponIssueId='" + couponIssueId + '\'' +
                ", enterpriseId=" + enterpriseId +
                ", couponNo='" + couponNo + '\'' +
                ", couponIsUsed='" + couponIsUsed + '\'' +
                ", couponGetTime=" + couponGetTime +
                ", couponEffectiveTime='" + couponEffectiveTime + '\'' +
                ", couponIsEffective='" + couponIsEffective + '\'' +
                ", appUserInfo=" + appUserInfo +
                ", verificationUserPhone='" + verificationUserPhone + '\'' +
                ", verificationTime=" + verificationTime +
                ", verificationUserAccount='" + verificationUserAccount + '\'' +
                ", couponTemplateInfo=" + couponTemplateInfo +
                ", couponIssueInfo=" + couponIssueInfo +
                ", oilList=" + oilList +
                ", couTypeParam='" + couTypeParam + '\'' +
                ", randomFlag='" + randomFlag + '\'' +
                ", canUse='" + canUse + '\'' +
                ", oils='" + oils + '\'' +
                ", couponStaNames='" + couponStaNames + '\'' +
                ", verStaNames='" + verStaNames + '\'' +
                ", couponAmtByCNY=" + couponAmtByCNY +
                ", superId=" + superId +
                ", couponThresholdAmt=" + couponThresholdAmt +
                ", oilId='" + oilId + '\'' +
                ", memberLevel='" + memberLevel + '\'' +
                ", stationId=" + stationId +
                ", payType='" + payType + '\'' +
                ", couponId=" + couponId +
                ", issueName='" + issueName + '\'' +
                ", issueType='" + issueType + '\'' +
                ", couponType='" + couponType + '\'' +
                ", couponAmt=" + couponAmt +
                ", activityFlag='" + activityFlag + '\'' +
                ", minUseCouponAmt='" + minUseCouponAmt + '\'' +
                ", ccsdStatus='" + ccsdStatus + '\'' +
                ", ccsdId=" + ccsdId +
                '}';
    }
}
